<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qmlreference.qdoc -->
  <title>The QML Reference | Qt QML 5.12.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.12</a></td><td ><a href="qtqml-index.html">Qt QML</a></td><td >The QML Reference</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtqml-index.html">Qt 
5.12.3 <span lang="zh-cn">参考指南文档</span></a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title"><span lang="zh-cn">QML参考指南</span></h1>
<span class="subtitle"></span>
<!-- $$$qmlreference.html-description -->
<div class="descr"> <a name="details"></a>
<p>
QML是一种用于创建高度动态应用程序的多范式语言。使用QML，可以声明应用程序构建块(如UI组件)，并设置各种属性来定义应用程序行为。可以通过JavaScript进一步编写应用程序行为的脚本，但这里的只是JavaScript语言的子集。此外，QML大量使用Qt，这允许从QML应用程序直接访问类型和其他Qt特性。</p>
<p>本参考指南描述了QML语言的特性。指南中的许多QML类型都源自 <a href="qtqml-index.html">Qt QML</a> or <a href="../qtquick/qtquick-index.html">Qt Quick</a> 
<span lang="zh-cn">模块。</span></p>
<ul>
<li><a href="qtqml-syntax-basics.html">QML<span lang="zh-cn">语法基础知识</span></a><ul>
<li><a href="qtqml-syntax-imports.html">Import<span lang="zh-cn">（导入）</span>
<span lang="zh-cn">语句</span></a></li>
<li><a href="qtqml-syntax-basics.html#object-declarations"><span lang="zh-cn">
对象声明</span></a><ul>
<li><a href="qtqml-syntax-basics.html#child-objects"><span lang="zh-cn">子对象</span></a></li>
</ul>
</li>
<li><a href="qtqml-syntax-basics.html#comments"><span lang="zh-cn">注释</span></a></li>
</ul>
</li>
<li><a href="qtqml-syntax-objectattributes.html">QML<span lang="zh-cn">对象特性</span></a><ul>
<li><a href="qtqml-syntax-objectattributes.html#the-id-attribute"><i>id</i>
<span lang="zh-cn">特性</span></a></li>
<li><a href="qtqml-syntax-objectattributes.html#property-attributes">Property<span lang="zh-cn">（属性）特性</span></a></li>
<li><a href="qtqml-syntax-objectattributes.html#signal-attributes">Signal<span lang="zh-cn">（信号）特性</span></a></li>
<li><a href="qtqml-syntax-objectattributes.html#method-attributes">Method<span lang="zh-cn">（方法）特性</span></a></li>
<li>
<a href="qtqml-syntax-objectattributes.html#attached-properties-and-attached-signal-handlers">
<span lang="zh-cn">附加属性和附加信号处理程序</span></a></li>
<li><a href="qtqml-syntax-objectattributes.html#enumeration-attributes">Enumeration<span lang="zh-cn">(枚举）</span>
<span lang="zh-cn">特性</span></a></li>
</ul>
</li>
<li><a href="qtqml-syntax-propertybinding.html"><span lang="zh-cn">属性绑定</span></a></li>
<li><a href="qtqml-syntax-signals.html"><span lang="zh-cn">信号和处理程序事件系统</span></a></li>
<li><a href="qtqml-javascript-topic.html">集成QML和JavaScript</a><ul>
<li><span lang="zh-cn">在</span><a href="qtqml-javascript-expressions.html">QML<span lang="zh-cn">中</span>使用JavaScript表达式</a></li>
<li><a href="qtqml-javascript-dynamicobjectcreation.html"><span lang="zh-cn">使用</span>JavaScrip<span lang="zh-cn">动态创建QML对象</span></a></li>
<li><a href="qtqml-javascript-resources.html"><span lang="zh-cn">在</span>QM<span lang="zh-cn">L中定义JavaScript资源</span></a></li>
<li><a href="qtqml-javascript-imports.html"><span lang="zh-cn">在</span> QM<span lang="zh-cn">L中导入JavaScript资源</span></a></li>
<li><a href="qtqml-javascript-hostenvironment.html">JavaScript<span lang="zh-cn">主机环境</span></a></li>
</ul>
</li>
<li><a href="qtqml-typesystem-topic.html">QML<span lang="zh-cn">类型系统</span></a><ul>
<li><a href="qtqml-typesystem-basictypes.html"><span lang="zh-cn">基本类型</span></a></li>
<li><a href="qtqml-typesystem-topic.html#javascript-types">JavaScript<span lang="zh-cn">类型</span></a></li>
<li><a href="qtqml-typesystem-objecttypes.html">QML<span lang="zh-cn">对象类型</span></a><ul>
<li><a href="qtqml-documents-definetypes.html"><span lang="zh-cn">用</span> QM<span lang="zh-cn">L定义对象类型</span></a></li>
<li><a href="qtqml-cppintegration-definetypes.html"><span lang="zh-cn">用</span>C+<span lang="zh-cn">+定义对象类型</span></a></li>
</ul>
</li>
</ul>
</li>
<li><a href="qtqml-modules-topic.html">QML <span lang="zh-cn">模块</span></a><ul>
<li><a href="qtqml-modules-qmldir.html"><span lang="zh-cn">指定</span>QML<span lang="zh-cn">模块</span></a></li>
<li><a href="qtqml-modules-topic.html#supported-qml-module-types">支持QML模块类型</a><ul>
<li><a href="qtqml-modules-identifiedmodules.html"><span lang="zh-cn">识别模块</span></a></li>
<li><a href="qtqml-modules-legacymodules.html"><span lang="zh-cn">遗留模块</span></a></li>
</ul>
</li>
<li><a href="qtqml-modules-cppplugins.html"><span lang="zh-cn">在</span>C++<span lang="zh-cn">插件中提供类型和功能</span></a></li>
</ul>
</li>
<li><a href="qtqml-documents-topic.html">QML<span lang="zh-cn">文档</span></a><ul>
<li><a href="qtqml-documents-structure.html">QML<span lang="zh-cn">文档结构</span></a></li>
<li><a href="qtqml-documents-topic.html#syntax-of-the-qml-language">QML<span lang="zh-cn">语言语法</span></a></li>
<li><a href="qtqml-documents-definetypes.html">通过QML文档定义对象类型</a><ul>
<li>
<a href="qtqml-documents-definetypes.html#defining-an-object-type-with-a-qml-file">
用QML文件定义对象类型</a></li>
<li>
<a href="qtqml-documents-definetypes.html#accessible-attributes-of-custom-types">
自定义类型的可访问属性</a></li>
</ul>
</li>
<li><a href="qtqml-documents-networktransparency.html">资源加载和网络透明度</a></li>
<li><a href="qtqml-documents-scope.html">范围和命名解析</a></li>
</ul>
</li>
</ul>
</div>
<!-- @@@qmlreference.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
